#pragma once
/*	Initial Author: Borja De La Viuda
 *	Modified By: ||Enter Names of people which modified this class here if any||
 *	Description: Freelist used to preallocate and manage the generation of obstacles (GameEntities)
 *	allowing to retrieve and discard objects without need of calling new and delete over and over again (unless the freelist is empty, which it kinda shouldnt be)
 */

#include <queue>
#include "GameEntity.h"
#include "InertialMatrixHelper.h"

using std::queue;

class EntityFreeList
{
public:
	EntityFreeList(unsigned int startCount = 0);

	GameEntity* GetNewObject();

	void DiscardObject(GameEntity* object);

	void ClearList();

	~EntityFreeList();

protected:
	queue<GameEntity *> contents;
};

